home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’95 / Menu Controls / UTextShape.h < prev   
Encoding:
Text File  |  1995-06-24  |  1.3 KB  |  55 lines  |  [TEXT/MPS ]

  1. // Copyright © 1994-95 by Apple Computer, Inc. All rights reserved.
  2. // UTextShape.h
  3.  
  4. #ifndef __UTEXTSHAPE__
  5. #define __UTEXTSHAPE__
  6.  
  7. #ifndef __USHAPES__
  8. #include "UShapes.h"
  9. #endif
  10.  
  11. //--------------------------------------------------------------------------------------------------
  12.  
  13. class TEditText;
  14.  
  15. //--------------------------------------------------------------------------------------------------
  16. // CLASS TTextShape
  17. //--------------------------------------------------------------------------------------------------
  18.  
  19. class TTextShape : public TShape
  20. {
  21.     MA_DECLARE_CLASS;
  22.  
  23.   public:
  24.     TTextShape();
  25.     void ITextShape(const CRect& itsExtent, short itsID);
  26.     
  27.     virtual void DoInitialState(TShapeView* itsView); // Override
  28.  
  29.     void CreateEditText(TView* itsView);
  30.     void SetEditTextFrame();
  31.  
  32.     virtual TObject* Clone();    // Override
  33.  
  34.     virtual void Free();    // Override
  35.     
  36.     virtual void ReadFrom(TStream* aStream);    // Override
  37.     virtual void WriteTo(TStream* aStream);        // Override
  38.  
  39.     void SetText(Handle text);
  40.     
  41.     virtual void BeInView(TShapeView* itsView);    // Override
  42.  
  43.     virtual void Draw();    // Override
  44.     void DrawInsides(const CRect& extent);
  45.     void DrawOutline();
  46.  
  47.     virtual void SetFrame(const CRect& extentRect); // override
  48.  
  49.   private:
  50.     TEditText*        fEditText;
  51.     Handle            fText;
  52. };
  53.  
  54. #endif
  55.